package com.dodoke.ojserver.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@Data
public class UserList {

    private String userId;      //用户ID
    private String email;       //邮箱
    private Integer submit;     //提交次数
    private Integer solved;     //AC次数
    private String defunct;     //unll
    private String ip;          //IP地址
    private Timestamp accesstime;    //最新登录时间
    private Integer volume;     //null
    private Integer language;   //语言
    private String password;    //加密后的密码
    private Timestamp regTime;       //注册时间
    private String nick;        //昵称
    private String school;      //学校

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getSubmit() {
        return submit;
    }

    public void setSubmit(Integer submit) {
        this.submit = submit;
    }

    public Integer getSolved() {
        return solved;
    }

    public void setSolved(Integer solved) {
        this.solved = solved;
    }

    public String getDefunct() {
        return defunct;
    }

    public void setDefunct(String defunct) {
        this.defunct = defunct;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Timestamp getAccesstime() {
        return accesstime;
    }

    public void setAccesstime(Timestamp accesstime) {
        this.accesstime = accesstime;
    }

    public Integer getVolume() {
        return volume;
    }

    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    public Integer getLanguage() {
        return language;
    }

    public void setLanguage(Integer language) {
        this.language = language;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Timestamp getRegTime() {
        return regTime;
    }

    public void setRegTime(Timestamp regTime) {
        this.regTime = regTime;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    @Override
    public String toString() {
        return "UserList{" +
                "userId='" + userId + '\'' +
                ", email='" + email + '\'' +
                ", submit=" + submit +
                ", solved=" + solved +
                ", defunct='" + defunct + '\'' +
                ", ip='" + ip + '\'' +
                ", accesstime=" + accesstime +
                ", volume=" + volume +
                ", language=" + language +
                ", password='" + password + '\'' +
                ", regTime=" + regTime +
                ", nick='" + nick + '\'' +
                ", school='" + school + '\'' +
                '}';
    }

//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
//    public Timestamp getAccesstime() {
//        return accesstime;
//    }
//
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
//    public Timestamp getRegTime() {
//        return regTime;
//    }


}
